{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Gradient Descent"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "from numpy import * \n",
    "import matplotlib.pyplot as plt "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {
    "collapsed": false,
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[ 32.50234527  31.70700585]\n",
      " [ 53.42680403  68.77759598]\n",
      " [ 61.53035803  62.5623823 ]\n",
      " [ 47.47563963  71.54663223]\n",
      " [ 59.81320787  87.23092513]\n",
      " [ 55.14218841  78.21151827]\n",
      " [ 52.21179669  79.64197305]\n",
      " [ 39.29956669  59.17148932]\n",
      " [ 48.10504169  75.3312423 ]\n",
      " [ 52.55001444  71.30087989]]\n",
      "Shape: (100, 2) \n"
     ]
    }
   ],
   "source": [
    "#Loading data from the file\n",
    "points = genfromtxt(\"input/data.csv\", delimiter=\",\")\n",
    "print (points[0:10,:])\n",
    "print('Shape: {0} '.format(points.shape))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {
    "collapsed": false,
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGHCAYAAABiT1LUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3X+cXFV9//HXZxcBRQkx0FBQENjdFK0FN0CD5kcNm26y\nEQGtlkmytFq1fhESY78V+KoVpVW+/uA3fkupWmXLCGItCku2LEj4VX64y4+iMbNZwKCRCNkYFBRw\nc75/3DvJ7GR+75059868n4/HPJK99+6dM2c3mc+c8zmfY845RERERHxp890AERERaW0KRkRERMQr\nBSMiIiLilYIRERER8UrBiIiIiHilYERERES8UjAiIiIiXikYEREREa8UjIiIiIhXCkZEZBcz+zcz\neyLv2E4z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DbM7JXA14GvOOfWAx8Ajjez\nv/XbMhGpJwUjIhInF4Z/ngfgnPsp8PfAF83sMG+tEpG60jSNiMSCmS0EhoFFzrn/zjt3C7CXc26J\nl8aJSF0pGBERERGvNE0jIiIiXikYEREREa8UjIiIiIhXCkZERETEKwUjIiIi4pWCEREREfFKwYiI\niIh4pWBEREREvFIwIiIiIl4pGBERERGvFIyIiIiIVwpGRERExKv/D1VAk8mRzs4BAAAAAElFTkSu\nQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2ac0982a828>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Plot the load data points here \n",
    "\n",
    "\n",
    "plt.scatter(points[:,0], points[:,1])\n",
    "plt.xlabel('X')\n",
    "plt.ylabel('Y')\n",
    "plt.title('Gradient Descent')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#Initializing the hyperparameters with initial value\n",
    "\n",
    "b = 0\n",
    "m = 0 \n",
    "learning_rate = 0.0001 #alpha\n",
    "num_iterations = 1000 #number of iteration"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def GetGradientDescent(b_current, m_current, points,learning_rate):\n",
    "    b_gradient = 0\n",
    "    m_gradient = 0\n",
    "    N = float(len(points))\n",
    "    for i in range(0, len(points)):\n",
    "        x = points[i, 0]\n",
    "        y = points[i, 1]\n",
    "        b_gradient += -(2/N) * (y - ((m_current * x) + b_current))\n",
    "        m_gradient += -(2/N) * x * (y - ((m_current * x) + b_current))\n",
    "        \n",
    "    new_b = b_current - (learning_rate * b_gradient)\n",
    "    new_m = m_current - (learning_rate * m_gradient)\n",
    "   \n",
    "    return [new_b, new_m]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def ComputerError(b,m,points):\n",
    "    totalError = 0\n",
    "    for i in range(len(points)):\n",
    "        x = points[i, 0]\n",
    "        y = points[i, 1]\n",
    "        totalError += (y - (m * x + b)) ** 2\n",
    "    return totalError / float(len(points))\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "def RunAlgorithm(starting_b, starting_m, learning_rate, num_iterations, points):\n",
    "    b = starting_b\n",
    "    m = starting_m\n",
    "\n",
    "    \n",
    "    \n",
    "    for i in range(num_iterations):\n",
    "        b, m = GetGradientDescent(b, m, array(points), learning_rate)\n",
    "        error = ComputerError(b, m, points)\n",
    "        if error < float64(2.0):\n",
    "            print(error)\n",
    "            return [b, m]\n",
    "              \n",
    "        if i % 100 == 0: \n",
    "            print (\"After {0} iterations b = {1}, m = {2}, error = {3}\".format(i, b, m, ComputerError(b, m, points)))\n",
    "        \n",
    "    return [b, m]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Starting gradient descent at b = 0, m = 0, error = 5565.107834483211\n",
      "Running...\n",
      "After 0 iterations b = 0.014547010110737297, m = 0.7370702973591052, error = 1484.586557408649\n",
      "After 100 iterations b = 0.035135020029129285, m = 1.4788015372774521, error = 112.64702056974568\n",
      "After 200 iterations b = 0.04113767542736797, m = 1.478683556914539, error = 112.64341600405817\n",
      "After 300 iterations b = 0.047135801867801, m = 1.4785656655669115, error = 112.63981687555349\n",
      "After 400 iterations b = 0.05312940276749252, m = 1.4784478631674083, error = 112.63622317603011\n",
      "After 500 iterations b = 0.05911848154092854, m = 1.478330149648919, error = 112.63263489729884\n",
      "After 600 iterations b = 0.06510304160001891, m = 1.4782125249443832, error = 112.62905203118288\n",
      "After 700 iterations b = 0.07108308635409925, m = 1.4780949889867918, error = 112.62547456951779\n",
      "After 800 iterations b = 0.0770586192099327, m = 1.4779775417091856, error = 112.62190250415141\n",
      "After 900 iterations b = 0.08302964357171226, m = 1.4778601830446565, error = 112.61833582694376\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAioAAAGHCAYAAACeWnkeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzs3Xl8lNXZ//HPlbgVF0CsoFbrwlL1Z4WACIqiggaDWjfU\nBNFq3eqCxT5WbLGuj7Z1xaqtUq1Walyw1qpIEBVcWQxY6vKQgFp3VMLiDibX749zD0wmk43Mmnzf\nr9f9Sua+z9xzZhDn4pxzXcfcHREREZFcVJDtDoiIiIg0RoGKiIiI5CwFKiIiIpKzFKiIiIhIzlKg\nIiIiIjlLgYqIiIjkLAUqIiIikrMUqIiIiEjOUqAiIiIiOUuBiogkZWZ3m9nbCefqzOy32eqTiHQ8\nClREcoyZ7Whmt5jZIjP7Mjpej87tkcGueHQ0dy6lzKzUzM5vRft3ogCqzsxqzWy5mS00s9vNbGA6\n+5otZraNmV1qZj/Odl9E0m2DbHdARNYxs8OA+4E1wN+BfwN1wI+Ao4GzzGwnd38vS138HvBdml+j\nDNgdmNjC9g4sAK4DDNgc2BUYBZxuZje4+/+ko6NZtC1wKfA2sDDLfRFJKwUqIjnCzHYGyglfPsPc\n/ZOE6xcBZxMCl6bu08ndv0pHH919dTrumwIfuHt5/Ino87oPuMDMqt399ux0LS0s2x0QyRRN/Yjk\njouATsApiUEKgLvXufst7v5B7Fy0juRzM9vZzKaa2SpgcnRtiJk9aGb/NbNvzOxdM7vBzDZJvLeZ\nHWlmr5nZ19G0yZHJOphsjYqZbWtmd5nZx9HrvGZmpyS0GRo9d5SZ/cbM3otea4aZ7RLX7llgJPDD\nuOmct1r1Ka77vL4FTgJqgN8k9MfM7Bdx7/ljM/uzmXVJaDfAzCrM7FMz+8rM3jKzO5Pc6/zoc/va\nzD4xsyfNrCih3Ylm9kp0n2VmVm5mP0hoMzO6z65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yjs6zlJGDX6JMfzwBzB+kXACfo5z0\neDrwMsrlp/8F/Hm/54FyWe4xlMJ9GPij6vmMsfa7+mzZQFlzbg6lAP7XuvvWqTxQThtZRSngZ7V9\nfh7Y6TzUnoyafxALKd8aWh/DwM62djOArwJPUoqUjwAT6o5/HPJxAfAo5VK7u4G5dcc0zv0dHuXn\nvxM4p63d5ZRLErdTrvh6Zd2xdyE3d7QWKoOUh+rg/EDVz+8Ci0Zp09e5qA5SV1cHmaeqA/EVtN2S\noR/zQJn2HO2z4bNj7TdwEOUeTVsohe5K4MV1961TeaAUr+37Rp7P63QeXJRQkiQ1Vl+eoyJJkvqD\nhYokSWosCxVJktRYFiqSJKmxLFQkSVJjWahIkqTGslCRJEmNZaEiSZIay0JFkiQ1loWKpMaJiAkR\ncVdEfLlt+8ER8VhEXFlXbJK6y1voS2qkiDgKuA94Z2auqLbdQFkE7disVkCX1N8sVCQ1VkRcSFkA\n7tXA8cAXKYtlPlhnXJK6x0JFUqNFxO2UlVlnAcsy88M1hySpiyxUJDVaRMwE1gMPALMzc7jmkCR1\nkSfTSmq6dwBPAa8Ajqg5Fkld5oiKpMaKiF8Hvg6cCnyA8pl1cr1RSeomR1QkNVJEvAD4HLA8M+8E\nzgWOjYjz641MUjdZqEhqqquqPy8DyMwfApcAH4uIl9YWlaSucupHUuNExDzgNuANmXl3275bgImZ\neUotwUnqKgsVSZLUWE79SJKkxrJQkSRJjWWhIkmSGstCRZIkNZaFiiRJaiwLFUmS1FgWKpIkqbEs\nVCRJUmNZqEiSpMayUJEkSY1loSJJkhrLQkWSJDXW/wJDvTdhxtaf2wAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2ac09b847b8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "After 1000 iterations b = 0.08893651993741346, m = 1.4777440851894448, error = 112.61481011613473\n"
     ]
    }
   ],
   "source": [
    "print (\"Starting gradient descent at b = {0}, m = {1}, error = {2}\".format(b, m, ComputerError(b, m, points)))\n",
    "print (\"Running...\")\n",
    "[b_new, m_new] = RunAlgorithm( b, m, learning_rate, num_iterations, points)\n",
    "# Plot the load data points here \n",
    "x1 = 0\n",
    "x2 = 100\n",
    "plt.scatter(points[:,0], points[:,1])\n",
    "plt.plot([x1, x2], [m_new * x1 + b_new,m_new * x2 + b_new],  'r')\n",
    "plt.xlabel('X')\n",
    "plt.ylabel('Y')\n",
    "plt.title('Gradient Descent')\n",
    "\n",
    "plt.show()\n",
    "\n",
    "\n",
    "print (\"After {0} iterations b = {1}, m = {2}, error = {3}\".format(num_iterations, b_new, m_new, ComputerError(b_new, m_new, points)))"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [conda root]",
   "language": "python",
   "name": "conda-root-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
